Optimal. Leaf size=197 \[ \frac {a^3 (30 A+23 C) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {a^3 (30 A+23 C) \tan (c+d x)}{10 d}+\frac {3 a^3 (30 A+23 C) \sec (c+d x) \tan (c+d x)}{80 d}+\frac {(30 A+7 C) (a+a \sec (c+d x))^3 \tan (c+d x)}{120 d}+\frac {C \sec ^2(c+d x) (a+a \sec (c+d x))^3 \tan (c+d x)}{6 d}+\frac {C (a+a \sec (c+d x))^4 \tan (c+d x)}{10 a d}+\frac {a^3 (30 A+23 C) \tan ^3(c+d x)}{120 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 8, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {4174, 4095,
4086, 3876, 3855, 3852, 8, 3853} \begin {gather*} \frac {a^3 (30 A+23 C) \tan ^3(c+d x)}{120 d}+\frac {a^3 (30 A+23 C) \tan (c+d x)}{10 d}+\frac {a^3 (30 A+23 C) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {3 a^3 (30 A+23 C) \tan (c+d x) \sec (c+d x)}{80 d}+\frac {(30 A+7 C) \tan (c+d x) (a \sec (c+d x)+a)^3}{120 d}+\frac {C \tan (c+d x) \sec ^2(c+d x) (a \sec (c+d x)+a)^3}{6 d}+\frac {C \tan (c+d x) (a \sec (c+d x)+a)^4}{10 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3853
Rule 3855
Rule 3876
Rule 4086
Rule 4095
Rule 4174
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {C \sec ^2(c+d x) (a+a \sec (c+d x))^3 \tan (c+d x)}{6 d}+\frac {\int \sec ^2(c+d x) (a+a \sec (c+d x))^3 (2 a (3 A+C)+3 a C \sec (c+d x)) \, dx}{6 a}\\ &=\frac {C \sec ^2(c+d x) (a+a \sec (c+d x))^3 \tan (c+d x)}{6 d}+\frac {C (a+a \sec (c+d x))^4 \tan (c+d x)}{10 a d}+\frac {\int \sec (c+d x) (a+a \sec (c+d x))^3 \left (12 a^2 C+a^2 (30 A+7 C) \sec (c+d x)\right ) \, dx}{30 a^2}\\ &=\frac {(30 A+7 C) (a+a \sec (c+d x))^3 \tan (c+d x)}{120 d}+\frac {C \sec ^2(c+d x) (a+a \sec (c+d x))^3 \tan (c+d x)}{6 d}+\frac {C (a+a \sec (c+d x))^4 \tan (c+d x)}{10 a d}+\frac {1}{40} (30 A+23 C) \int \sec (c+d x) (a+a \sec (c+d x))^3 \, dx\\ &=\frac {(30 A+7 C) (a+a \sec (c+d x))^3 \tan (c+d x)}{120 d}+\frac {C \sec ^2(c+d x) (a+a \sec (c+d x))^3 \tan (c+d x)}{6 d}+\frac {C (a+a \sec (c+d x))^4 \tan (c+d x)}{10 a d}+\frac {1}{40} (30 A+23 C) \int \left (a^3 \sec (c+d x)+3 a^3 \sec ^2(c+d x)+3 a^3 \sec ^3(c+d x)+a^3 \sec ^4(c+d x)\right ) \, dx\\ &=\frac {(30 A+7 C) (a+a \sec (c+d x))^3 \tan (c+d x)}{120 d}+\frac {C \sec ^2(c+d x) (a+a \sec (c+d x))^3 \tan (c+d x)}{6 d}+\frac {C (a+a \sec (c+d x))^4 \tan (c+d x)}{10 a d}+\frac {1}{40} \left (a^3 (30 A+23 C)\right ) \int \sec (c+d x) \, dx+\frac {1}{40} \left (a^3 (30 A+23 C)\right ) \int \sec ^4(c+d x) \, dx+\frac {1}{40} \left (3 a^3 (30 A+23 C)\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{40} \left (3 a^3 (30 A+23 C)\right ) \int \sec ^3(c+d x) \, dx\\ &=\frac {a^3 (30 A+23 C) \tanh ^{-1}(\sin (c+d x))}{40 d}+\frac {3 a^3 (30 A+23 C) \sec (c+d x) \tan (c+d x)}{80 d}+\frac {(30 A+7 C) (a+a \sec (c+d x))^3 \tan (c+d x)}{120 d}+\frac {C \sec ^2(c+d x) (a+a \sec (c+d x))^3 \tan (c+d x)}{6 d}+\frac {C (a+a \sec (c+d x))^4 \tan (c+d x)}{10 a d}+\frac {1}{80} \left (3 a^3 (30 A+23 C)\right ) \int \sec (c+d x) \, dx-\frac {\left (a^3 (30 A+23 C)\right ) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{40 d}-\frac {\left (3 a^3 (30 A+23 C)\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{40 d}\\ &=\frac {a^3 (30 A+23 C) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {a^3 (30 A+23 C) \tan (c+d x)}{10 d}+\frac {3 a^3 (30 A+23 C) \sec (c+d x) \tan (c+d x)}{80 d}+\frac {(30 A+7 C) (a+a \sec (c+d x))^3 \tan (c+d x)}{120 d}+\frac {C \sec ^2(c+d x) (a+a \sec (c+d x))^3 \tan (c+d x)}{6 d}+\frac {C (a+a \sec (c+d x))^4 \tan (c+d x)}{10 a d}+\frac {a^3 (30 A+23 C) \tan ^3(c+d x)}{120 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.05, size = 387, normalized size = 1.96 \begin {gather*} -\frac {a^3 (1+\cos (c+d x))^3 \left (C+A \cos ^2(c+d x)\right ) \sec ^6\left (\frac {1}{2} (c+d x)\right ) \sec ^6(c+d x) \left (480 (30 A+23 C) \cos ^6(c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )-\sec (c) (-160 (45 A+34 C) \sin (c)+30 (38 A+75 C) \sin (d x)+1140 A \sin (2 c+d x)+2250 C \sin (2 c+d x)+8160 A \sin (c+2 d x)+7680 C \sin (c+2 d x)-2640 A \sin (3 c+2 d x)-480 C \sin (3 c+2 d x)+1590 A \sin (2 c+3 d x)+1955 C \sin (2 c+3 d x)+1590 A \sin (4 c+3 d x)+1955 C \sin (4 c+3 d x)+4080 A \sin (3 c+4 d x)+3264 C \sin (3 c+4 d x)-240 A \sin (5 c+4 d x)+450 A \sin (4 c+5 d x)+345 C \sin (4 c+5 d x)+450 A \sin (6 c+5 d x)+345 C \sin (6 c+5 d x)+720 A \sin (5 c+6 d x)+544 C \sin (5 c+6 d x))\right )}{30720 d (A+2 C+A \cos (2 (c+d x)))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.88, size = 294, normalized size = 1.49 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 382 vs.
\(2 (183) = 366\).
time = 0.30, size = 382, normalized size = 1.94 \begin {gather*} \frac {480 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a^{3} + 96 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} C a^{3} + 160 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a^{3} - 5 \, C a^{3} {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 33 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 30 \, A a^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 90 \, C a^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 360 \, A a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 480 \, A a^{3} \tan \left (d x + c\right )}{480 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.06, size = 181, normalized size = 0.92 \begin {gather*} \frac {15 \, {\left (30 \, A + 23 \, C\right )} a^{3} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (30 \, A + 23 \, C\right )} a^{3} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (16 \, {\left (45 \, A + 34 \, C\right )} a^{3} \cos \left (d x + c\right )^{5} + 15 \, {\left (30 \, A + 23 \, C\right )} a^{3} \cos \left (d x + c\right )^{4} + 16 \, {\left (15 \, A + 17 \, C\right )} a^{3} \cos \left (d x + c\right )^{3} + 10 \, {\left (6 \, A + 23 \, C\right )} a^{3} \cos \left (d x + c\right )^{2} + 144 \, C a^{3} \cos \left (d x + c\right ) + 40 \, C a^{3}\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{3} \left (\int A \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 A \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 A \sec ^{4}{\left (c + d x \right )}\, dx + \int A \sec ^{5}{\left (c + d x \right )}\, dx + \int C \sec ^{4}{\left (c + d x \right )}\, dx + \int 3 C \sec ^{5}{\left (c + d x \right )}\, dx + \int 3 C \sec ^{6}{\left (c + d x \right )}\, dx + \int C \sec ^{7}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 280, normalized size = 1.42 \begin {gather*} \frac {15 \, {\left (30 \, A a^{3} + 23 \, C a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 15 \, {\left (30 \, A a^{3} + 23 \, C a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (450 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 345 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 2550 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 1955 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 5940 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 4554 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 7500 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 5814 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 5130 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3165 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1470 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1575 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6}}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.28, size = 262, normalized size = 1.33 \begin {gather*} \frac {\left (-\frac {15\,A\,a^3}{4}-\frac {23\,C\,a^3}{8}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+\left (\frac {85\,A\,a^3}{4}+\frac {391\,C\,a^3}{24}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (-\frac {99\,A\,a^3}{2}-\frac {759\,C\,a^3}{20}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {125\,A\,a^3}{2}+\frac {969\,C\,a^3}{20}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {171\,A\,a^3}{4}-\frac {211\,C\,a^3}{8}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {49\,A\,a^3}{4}+\frac {105\,C\,a^3}{8}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (30\,A+23\,C\right )}{8\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________